{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "1b54c9cf",
   "metadata": {},
   "outputs": [],
   "source": [
    "def DetermineDomination(Particles):\n",
    "    #Note here we are taking particles as 1D-array\n",
    "    numParticles = len(Particles)\n",
    "    \n",
    "    #Loop\n",
    "    for i in range(numParticles): #(0 .. numParticles -1)\n",
    "        Particles[i].Dominated = False\n",
    "        \n",
    "        if(i>=1):\n",
    "            for j in range(i):\n",
    "                if (Particles[j].Dominated == False):\n",
    "                    if (Dominates(Particles[i],Particles[j])):\n",
    "                        Particles(j).Dominated = True\n",
    "                    elif (Dominates(Particles[j],Particles[i])):\n",
    "                        Particles(i).Dominated = True\n",
    "                        break\n",
    "                    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3838c991",
   "metadata": {},
   "outputs": [],
   "source": [
    "[1 2 3 4 5]\n",
    "[a b c d e]\n",
    "[0 1 2 3 4]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6691c192",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n"
     ]
    }
   ],
   "source": [
    "#proof of working\n",
    "for k in range(1):\n",
    "    print(k)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8fba2761",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
